Skip to content

Fix wrapping parenthesis filter parsing error#152

Merged
varndellwagglebee merged 19 commits intomainfrom
fix-left-function-compare
Feb 17, 2026
Merged

Fix wrapping parenthesis filter parsing error#152
varndellwagglebee merged 19 commits intomainfrom
fix-left-function-compare

Conversation

@bfarmer67
Copy link
Contributor

@bfarmer67 bfarmer67 commented Dec 25, 2025

Description

Fixes wrapping parenthesis filter parsing error.

Type of Change

  • Bug fix
  • New feature
  • Documentation

Checklist

  • I have run the existing tests and they pass
  • I have run the existing benchmarks and verified performance has not decreased
  • I have added new tests that prove my change is effective or that my feature works

bfarmer67 and others added 9 commits July 6, 2025 08:46
Updates the filter parser to correctly handle function comparisons
within JSONPath expressions.

Ensures that functions requiring comparison (e.g., length(@.title))
are properly validated and throw exceptions when used as standalone
expressions without a comparison operator. This change prevents
invalid filter expressions while allowing valid expressions with
comparison operators (e.g., length(@.title) > 10).

Also includes benchmark updates and minor cleanup.
Adds naming rule for type parameters.

Streamlines the filter parser by removing unnecessary checks and improving character handling within quotes. This enhances efficiency and code clarity.

The parser now throws an exception if a function that requires comparison is left as a standalone expression.
Corrects the comparison logic in the filter parser to properly handle `CompareConstraint` flags using bitwise AND instead of `HasFlag()`, which can lead to boxing allocations. This improves performance and ensures accurate evaluation of filter expressions.

Also optimizes the `OperatorExtensions` methods to use direct bitwise operations instead of `HasFlag()` for better performance.

Replaces `Scalar.Value` with direct instantiation of `ScalarValue` to avoid unnecessary indirection.

Updates the .gitignore to include baseline benchmark results.

Removes the benchmark report markdown file and updates the benchmark to use pre-parsed `JsonDocument` for more accurate measurements.
@varndellwagglebee varndellwagglebee self-assigned this Feb 17, 2026
@varndellwagglebee varndellwagglebee merged commit 82d46f2 into main Feb 17, 2026
3 checks passed
@varndellwagglebee varndellwagglebee deleted the fix-left-function-compare branch February 17, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants